// 获取当前组件实例
import {getCurrentInstance, ref} from "vue";
import shanxi from "../assets/shanxi.json";
export function drawLine(ref, options) {
    var myChart = getCurrentInstance().proxy.$echarts.init(ref)
    myChart.setOption(options);
    window.onresize = function () {
        myChart.resize();
    };
    return myChart
}
export function drawMap(ref, options,mapName,json) {
    const echarts = getCurrentInstance().proxy.$echarts
    var myChart = echarts.init(ref)
    echarts.registerMap(mapName, json)
    myChart.setOption(options);
    return myChart
}